1. Field of the Invention
The present invention relates to a method and apparatus for pulse width modulation for use with class D amplifier circuits and the like.
2. Description of the Related Art
In general, in the descriptions that follow, I will italicize the first occurrence of each special term of art that should be familiar to those skilled in the art of integrated circuits (“ICs”) and systems. In addition, when I first introduce a term that I believe to be new or that I will use in a context that I believe to be new, I will bold the term and provide the definition that I intend to apply to that term. In addition, throughout this description, I will sometimes use the terms assert and negate when referring to the rendering of a signal, signal flag, status bit, or similar apparatus into its logically true or logically false state, respectively, and the term toggle to indicate the logical inversion of a signal from one logical state to the other. Alternatively, I may refer to the mutually exclusive boolean states as logic_0 and logic_1. Of course, as is well known, consistent system operation can be obtained by reversing the logic sense of all such signals, such that signals described herein as logically true become logically false and vice versa. Furthermore, it is of no relevance in such systems which specific voltage levels are selected to represent each of the logic states.
Hereinafter, when I refer to a facility I mean a circuit or an associated set of circuits adapted to perform a particular function regardless of the physical layout of an embodiment thereof. Thus, the electronic elements comprising a given facility may be instantiated in the form of a hard macro adapted to be placed as a physically contiguous module, or in the form of a soft macro the elements of which may be distributed in any appropriate way that meets speed path requirements. In general, electronic systems comprise many different types of facilities, each adapted to perform specific functions in accordance with the intended capabilities of each system. Depending on the intended system application, the several facilities comprising the hardware platform may be integrated onto a single IC, or distributed across multiple ICs. Depending on cost and other known considerations, the electronic components, including the facility-instantiating IC(s), may be embodied in one or more single- or multi-chip packages. However, unless I expressly state to the contrary, I consider the form of instantiation of any facility that practices my invention as being purely a matter of design choice.
Shown in FIG. 1 is a typical general purpose computer system 10. In particular, in recently-developed battery-powered mobile systems, such as smart-phones and the like, many of the discrete components typical of desktop or laptop devices illustrated in FIG. 1 are integrated into a single integrated circuit chip.
Shown by way of example in FIG. 2 is one embodiment of a single-chip audio coder/decoder (“CODEC”) 12 comprising: a plurality of digital modules; and a plurality of analog modules. In this embodiment, CODEC 12 includes a Serial Data Interface facility adapted to send data to, and receive digital data from, the system 10; a Digital Phase-Locked Loop (“DPW) facility adapted to determine the timing and rate relationship between two asynchronous data streams; a Configuration Memory and Control facility adapted to control which facilities are used and how, in accordance with configuration and control information received from the system 10; a Digital Signal Processor (”DSP″) facility 14 adapted to perform various data processing activities in accordance with a stored computer program; and a Data Memory facility adapted to store, as required, audio data flowing from the system 10 to the audio output devices. I may expand on the functionality of certain of these facilities as I now explain the method of operation of my invention and embodiments thereof.
I believe that ternary pulse width modulation (“PWM”) was first disclosed in U.S. Pat. No. 5,077,539, Howatt, issued 31 Dec. 1991 (“Howatt”), and the entire subject matter of which is expressly incorporated herein by reference. An improvement of Howatt was disclosed in U.S. Pat. No. 5,617,058, Adrian, et. al, issued 1 Apr. 1997 (“Adrian”), and the entire subject matter of which is expressly incorporated herein by reference. As was explained in Adrian:                In an implementation of an all digital switching amplifier according to the invention, non-linearity introduced by non-ideal switches is compensated for by setting a minimum output pulse width such that the effective output pulse energy is not reduced by the non-ideal rise and fall times of the output switch elements. The effective pulse shape remains trapezoidal and does not become triangular. To compensate at the output for the effect of the non-ideal switch rise and fall times, the minimum output pulse is also applied to the load in opposite phase during the same frame to reproduce the waveform such as illustrated in FIG. 5.        The result of this waveform is that zero net energy is delivered to the load during the frame. As the minimum and compensating pulses are applied within a fraction of the frame of each other, and variations in power supply voltage or load characteristics due to external influences occur at much lower than the frame rate, the compensation is not dependent on factors external to the switch. The compensation is dependent on the matching of the switch elements, as different elements may have different rise and fall times. For discrete switch elements of the same type or for a monolithic construction of the switch, these differences are minimal. The compensation is also dependent on the timing characteristics of the switch driver and logic circuits used to convert the word from the signal processor to the output pulsed widths. Careful consideration to the timing characteristic of these elements has been made to minimize the differences in producing positive and negative pulses. During the time of a single frame, any remaining difference can be considered invariant and does not affect the performance of the compensation. A net residual difference between the two pulses results in a fixed offset of the zero output. This offset may be compensated by subtraction from the original digital data but is generally negligible for most applications, as are changes in the offset due to external influence such as time and temperature.        When a signal is applied, the resulting effective pulse width is then only dependent on the time increment commanded. The output resolution is therefore only limited by the ability to control the relative increment, which can be extended to effect continuous control of the pulse width. FIG. 6A and 6B illustrate, respectively, the negative and positive compensated outputs derived from the ideal pulse command. The cancellation provided by the minimum pulse and the compensating pulse leave an effective net energy that is only dependent on the ideal commanded width. According to the invention, as discussed in greater detail hereinafter, the modulation commands, i.e. minimum and compensating pulse, are stored in a pulse command table, rather than being computed on the fly. The output of a noise shaper points to the pulse command table. The substantially linear output resulting from application of the compensating pulse(s) is illustrated in FIG. 7. Col. 6, line, 43 to col. 7, line 11.        
The Adrian invention was initially commercialized by Apogee Technology, Inc., and the hardware instantiations thereof were marketed under the registered trademark DDX®. Although Apogee is no longer a going concern, instantiations of this technology are available today from Tempo Semiconductor, Inc. (“Tempo”), the assignee of the present application. In support of these products, Tempo published, in 2013, a white paper entitled “Direct Digital Amplification (DDX®)” (the “White Paper”), a copy of which is submitted herewith and the entire subject matter thereof is expressly incorporated herein by reference. As can be seen in FIG. 3 of the White Paper, a bridge-tied load is selectively driven between three states: a positive state, a damped state, and a negative state; a fourth state, zero state, is also possible wherein both sides of the bridge are driven high rather than low as in the damped state. As noted in Adrian, distortion in the ternary PWM output stream can be reduced by developing signal and compensation pulses that follow a predetermined sequence of edge transitions with minimum pulse widths, and then increasing the pulse width of either the positive, P, or negative, N, signal pulses beyond the minimum width to achieve signal modulation.
By way of example, FIG. 3 and FIG. 4 illustrate the Adrian method for a positive signal. At a low modulation index, as in FIG. 3, the P pulse is a little wider than the minimum width. Note that, at the compensation pulse boundary, i.e., between the first phase and the last phase of the compensation pulses (shaded), the edges of the N and P pulses can be aligned, spaced-apart, or overlapping, as long as this relationship is consistent across all frames. As in Adrian, the shaded portion of the compensation pulse of the same polarity as the signal is shaped identically to the opposite polarity compensation pulse, in order to illustrate that the net effect of the compensation pulses is a zero; in reality, the same polarity compensation pulse is contiguous with the signal pulse. Although, in this example, I have shown the negative portion of the compensation pulse as always preceding the positive portion, those skilled in this art will recognize that the order may be reversed.
At a high modulation index, as in FIG. 4, the P pulse in the current frame is typically much wider than the selected minimum pulse width, and the N compensation pulse in this frame has been pushed all the way to the leading edge of the current frame boundary. Because the positions of the P and N pulses within each frame are determined by timer count values that are referenced with respect to the leading edge of the current frame, the modulation index cannot increase any further using this prior art approach without dropping the compensation pulses from the developed compensated composite waveforms. As can be seen in FIG. 5, the Adrian approach is not well adapted to develop effective compensation pulses as the modulation index approaches a relative maximum at which the leading edge of the P pulse occurs very close to the leading edge of the current frame boundary. There is a need for a method to implement a ternary PWM having a higher modulation index without dropping any compensation pulses.